<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>config.inc.php Editor</title>
</head>

<body>
<?php
require_once ('config.inc.php');
error_reporting ( E_ALL );
session_start ();
if (isset ( $_POST ['Password'] ))
	$_SESSION ['adminpwd'] = $_POST ['Password'];
$isAdmin = isset ( $_SESSION ['adminpwd'] ) && md5 ( $_SESSION ['adminpwd'] ) == AdminPwdMD5;
if ($isAdmin) {
	if (isset ( $_POST ['editor'] )) {
		$data = $_POST ['editor'];
		if (get_magic_quotes_runtime () || get_magic_quotes_gpc ())
			$data = stripcslashes ( $data );
		file_put_contents ( 'config.inc.php', $data );
		echo '<p>File Saved</p>';
	}
	?>
<form action="" method="post"
		enctype="application/x-www-form-urlencoded">
		<p>
			<textarea name="editor" cols="80" rows="30"><?php
	
	echo htmlspecialchars ( file_get_contents ( 'config.inc.php' ) );
	?></textarea>
		</p>
		<p>
			<input name="Submit" type="submit" value="Save" /> <a
				href="admin.php">Back to admin</a> <a href="md5_tool.php">MD5 Hasher</a>
		</p>
	</form>
<?php
} else {
	?>
<strong>Please Login First</strong>
<?php } ?>
</body>
</html>